package com.zhuoyue.system.mapper;

import java.util.List;

import com.zhuoyue.common.annotation.DataSource;

import com.zhuoyue.system.domain.TblSecurityLog;
import com.zhuoyue.system.domain.po.TblSecurityLogPo;
import com.zhuoyue.system.domain.vo.TblSecurityLogVo;
import org.apache.ibatis.annotations.Param;

import static com.zhuoyue.common.enums.DataSourceType.*;

/**
 * logMapper接口
 *
 * @author hewenze
 * @date 2020-08-11
 */
@DataSource(SLAVE1)
public interface TblSecurityLogMapper {


    /**
     * 查询log列表
     *
     * @param tblSecurityLogPo log
     * @return log集合
     */
    public List<TblSecurityLogVo> selectTblSecurityLogList(TblSecurityLogPo tblSecurityLogPo);


    public Integer selectTblSecurityLogList1(@Param(value = "gatewayMac") String gatewayMac
            , @Param(value = "deviceMac") String deviceMac);

    public Integer selectTblSecurityLogList2(@Param(value = "gatewayMac") String gatewayMac
            , @Param(value = "deviceMac") String deviceMac);

    public Integer selectTblSecurityLogList3(@Param(value = "gatewayMac") String gatewayMac
            , @Param(value = "deviceMac") String deviceMac);

    public Integer selectTblSecurityLogList4(@Param(value = "gatewayMac") String gatewayMac
            , @Param(value = "deviceMac") String deviceMac);

    public Integer selectTblSecurityLogList5(@Param(value = "account") String account
            , @Param(value = "gatewayMac") String gatewayMac
            , @Param(value = "deviceMac") String deviceMac);


    int createTable(@Param("tblName") String tblName);

    //List<TblSecurityLog> selectByTime(@Param("tableName") String tableName,@Param("start") String start, @Param("end") String end);
    List<TblSecurityLog> selectByTime(@Param("tableName") List<String> tableName, @Param("orgCode") String orgCode, @Param("account") String account, @Param("gatewayMac") String gatewayMac, @Param("deviceMac") String deviceMac, @Param("start") String start, @Param("end") String end, @Param("pageNum1") Integer pageNum, @Param("pageSize1") Integer pageSize);

    Integer selectByTimeCount(@Param("tableName") List<String> tableName, @Param("orgCode") String orgCode, @Param("account") String account, @Param("gatewayMac") String gatewayMac, @Param("deviceMac") String deviceMac, @Param("start") String start, @Param("end") String end);


    List<String> selectTableName();

    //List<Map> selectTimeCount(@Param("tableName") List<String> tableName, @Param("start") String start, @Param("end") String end);
}
